home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 July / macformat52.iso / mac / Shareware Plus / Developers / YAAF v1.0 alpha 1 / (Samples) / Test Programs / TestSingleWindow / main.cpp next >
Encoding:
C/C++ Source or Header  |  1997-04-12  |  1.0 KB  |  65 lines

  1. /*    main.cpp
  2.  *
  3.  *        This is the actual core which makes this thing fly.
  4.  */
  5.  
  6. #include <string.h>
  7. #include <XApplication.h>
  8. #include <XWindow.h>
  9.  
  10.  
  11. /************************************************************************/
  12. /*                                                                        */
  13. /*    Main entry point                                                    */
  14. /*                                                                        */
  15. /************************************************************************/
  16.  
  17. /*    StartApplication
  18.  *
  19.  *        This starts up the application
  20.  */
  21.  
  22. XGAppCore *StartApplication(void)
  23. {
  24.     XGAppSingleWindow *aw;
  25.     XGWindow *w;
  26.     XGSWindowInitRecord wi;
  27.     
  28.     /*
  29.      *    Start application engine
  30.      */
  31.     
  32.     aw = new XGAppSingleWindow;
  33.     
  34.     /*
  35.      *    Start window
  36.      */
  37.     
  38.     wi.fViewType = 'wind';
  39.     wi.windowType = KWinTypeDocument;
  40.     wi.windowID = 0;
  41.     wi.fVisible = true;
  42.     wi.screenLeft = 0;
  43.     wi.screenTop = 0;
  44.     wi.screenRight = 205;
  45.     wi.screenBottom = 331;
  46.     
  47.     wi.minx = -1;
  48.     wi.miny = -1;
  49.     wi.maxx = -1;
  50.     wi.maxy = -1;
  51.     wi.initx = -1;
  52.     wi.inity = -1;
  53.     wi.zoomx = -1;
  54.     wi.zoomy = -1;
  55.     
  56.     strcpy(wi.windowName,"Test window");
  57.     w = new XGWindow(wi);
  58.     
  59.     /*
  60.      *    Done. Return
  61.      */
  62.     
  63.     return aw;
  64. }
  65.